package com.atguigu.ssyx.order.service;


import com.atguigu.ssyx.model.order.OrderInfo;
import com.atguigu.ssyx.vo.order.OrderConfirmVo;
import com.atguigu.ssyx.vo.order.OrderSubmitVo;
import com.atguigu.ssyx.vo.order.OrderUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author lqh
 * @since 2023-10-16
 */
public interface OrderInfoService extends IService<OrderInfo> {

    //确定订单
    OrderConfirmVo confirmOrder();

    //生成订单 返回订单Id
    Long submitOrder(OrderSubmitVo orderSubmitVo);

    //订单详情
    OrderInfo getOrderInfoById(Long orderId);

    //根据OrderNo查询订单信息
    OrderInfo getOrderInfoByOrderNo(String orderNo);


    //订单支付成功 更新订单状态 扣减库存
    void orderPay(String orderNo);

    //    //订单查询 条件分页查询
    IPage<OrderInfo> getOrderInfoByUserIdPage(Page<OrderInfo> infoPage, OrderUserQueryVo orderUserQueryVo);
}
